<link rel="stylesheet" type="text/css" href="/templates/styles/tabcontent.css">
<link href="/templates/styles/style.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="/templates/scripts/tabcontent.js"></script>
<script type="text/javascript" src="/templates/scripts/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
    tinyMCE.init({
    // General options
    mode : "textareas",
    theme : "advanced",
    plugins : "autolink,lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,advlist,autosave,visualblocks",

    // Theme options
    theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
    theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
    theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
    theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft,visualblocks",
    theme_advanced_toolbar_location : "top",
    theme_advanced_toolbar_align : "left",
    theme_advanced_statusbar_location : "bottom",
    theme_advanced_resizing : true,

    // Replace values for the template plugin
    template_replace_values : {
    username : "Some User",
    staffid : "991234"
}
});
</script>
<form action="/editproduct/{$productdetail[0].idproduct}" method="post" enctype="multipart/form-data" name="editproduct" id="editproduct" style="margin:0; padding:0" onsubmit="return checkinputproduct(this)">
	<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
		<tbody>
			<tr>
				<td class="bgtitle">
					<table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
						<tbody>
							<tr>
								<td width="20">
									<img src="/templates/images/mui_ten.gif">
								</td>

								<td valign="bottom" class="title">
									<a href="" class="linkcat20">{$productcategoryparent[0].parentname}</a> 
									<img src="/templates/images/linev2.jpg"> 
									<select id="idcategory" name="idcategory">
										{foreach from=$resultcategory item=i}
											{if $productdetail[0].idcategory==$i.idcategory}
												<option value="{$i.idcategory}" selected="selected">{$i.categoryname}</option>
											{else}
												<option value="{$i.idcategory}">{$i.categoryname}</option>
											{/if}

										{/foreach}
									</select>
								</td>

								<td width="10" valign="bottom">&nbsp;</td>
							</tr>
						</tbody>
					</table>
				</td>
			</tr>
			<tr>
				<td valign="top">
					<img src="/templates/images/space.gif" width="1" height="10">
				</td>
			</tr>
			<tr>
				<td valign="top">
					<table width="100%" style="border-collapse: collapse" border="0" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC">
						<tbody>
							<tr>
								<!-- Khung ảnh -->
								<td valign="top" width="250">
									<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
										<tbody>
											<!-- Đường trên khung ảnh -->
											<tr>
												<td>
													<table width="100%" border="0" cellspacing="0" cellpadding="0">
														<tbody>
															<tr>
																<td width="11">
																	<img src="/templates/images/tbl_pro1.jpg" width="11" height="11">
																</td>
																<td background="/templates/images/tbl_pro2.jpg">
																	<img src="/templates/images/tbl_pro2.jpg" width="1" height="11">
																</td>
																<td width="11">
																	<img src="/templates/images/tbl_pro3.jpg" width="11" height="11">
																</td>
															</tr>
														</tbody>
													</table>
												</td>
											</tr>
											<!-- Khung ảnh -->
											<tr>
												<td>
													<table width="100%" border="0" cellspacing="0" cellpadding="0">
														<tbody>
															<tr>
																<td width="11" style="background-image:url('/templates/images/tbl_pro4.jpg'); background-repeat:repeat-y; background-position:left top">
																	<img src="/templates/images/tbl_pro4.jpg" width="11" height="1">
																</td>
																<td>
																	<div align="center">     
																		<!-- Thay đổi ở đây -->
																		<img src="/templates/images/product/{$productdetail[0].image}" alt="{$productdetail[0].productname}" width="180" border="0">
																	</div>
																</td>
																<td width="11" style="background-image:url('/templates/images/tbl_pro5.jpg'); background-repeat:repeat-y; background-position:right top">
																	<img src="/templates/images/tbl_pro5.jpg" width="11" height="1">
																</td>
															</tr>
														</tbody>
													</table>
												</td>
											</tr>
											<!-- Đường dưới khung ảnh -->
											<tr>
												<td>
													<table width="100%" border="0" cellspacing="0" cellpadding="0">
														<tbody>
															<tr>
																<td width="11">
																	<img src="/templates/images/tbl_logo6.jpg" width="11" height="11">
																</td>
																<td background="/templates/images/tbl_logo7.jpg">
																	<img src="/templates/images/tbl_logo7.jpg" width="1" height="11">
																</td>
																<td width="11">
																	<img src="/templates/images/tbl_logo8.jpg" width="11" height="11">
																</td>
															</tr>
														</tbody>
													</table>
												</td>
											</tr>
										</tbody>
									</table>
								</td>
								<td width="30">&nbsp;</td>
								<!-- Thông tin chính của máy ảnh -->
								<td valign="top">
									<!-- Tên của máy ảnh -->
									<table width="85%" border="0" cellpadding="5" cellspacing="0">
										<tbody>
											<tr>
												<td class="brd_bott" width="30%">
													<strong>Tên sản phẩm:</strong>
												</td>
												<td class="brd_bott">
													<input type="text" id="productname" name="productname" value="{$productdetail[0].productname}">
												</td>
											</tr>
										</tbody>
									</table>
									<!-- Thông tin chính của máy ảnh -->
									<table width="85%" border="0" cellpadding="5" cellspacing="0">
										<tbody>
											<tr>
												<td class="brd_bott">
													<strong>Giá tại MPShop:</strong>
												</td>

												<td class="brd_bott">
													<!-- Thay đổi ở đây -->
													<span>
														<strong>
															<input type="text" id="priece" name="priece" value="{$productdetail[0].price|number_format}"> VNĐ
														</strong>
													</span>
												</td>
											</tr>
											<tr>
												<td width="30%" class="brd_bott">
													<strong>Giá hãng:</strong>
												</td>
												<td class="brd_bott">
													<span>
														<!-- Thay đổi ở đây -->
														<strong><input type="text" id="priece_company" name="priece_company" value="{$productdetail[0].price_company|number_format}"> VNĐ</strong>
													</span> 
												</td>
											</tr>
											<tr>
												<td class="brd_bott">
													<strong>Khuyến mãi:</strong>
												</td>
												<!-- Thay đổi ở đây -->
												<td class="brd_bott">
													<input type="text" id="promotion" name="promotion" value="{$productdetail[0].promotion}"></td>
											</tr>
											<tr>
												<td class="brd_bott">
													<strong>Bảo hành:</strong>
												</td>
												<!-- Thay đổi ở đây -->
												<td class="brd_bott">
													<input type="text" id="warranty" name="warranty" value="{$productdetail[0].warranty}"><br>tháng chính hãng trên toàn quốc
												</td>
											</tr>
											<tr>
												<td class="brd_bott">
													<strong>Màu sắc:</strong>
												</td>
												<td class="brd_bott">
													<table border="0" cellpadding="0" cellspacing="0">
														<tbody>
															<tr>
																<td id="color" rowspan="2" style="margin-right:30px">

																	{if isset($productdetailcolor)}
																		{foreach from=$resultcolor item=c}
																			<input type="checkbox" name="color[{$c@index}]" value="{$c.idcolor}" {if in_array($c.idcolor,$productdetailcolor)}checked="checked"{/if}>{$c.colorname}
																		{/foreach}
																	{/if}
																</td>
															</tr>
														</tbody>
													</table>
												</td>
											</tr>
											<tr>
												<td class="brd_bott">
													<strong>Kho hàng:</strong>
												</td>
												<!-- Thay đổi ở đây -->
												<td class="brd_bott">
													<input type="text" id="inventory" name="inventory" value="{$productdetail[0].inventory}">

												</td>
											</tr>
										<table>
											<tr>
												<td>
													<input type="submit" id="editproduct" name="editproduct" value="Lưu CSDL">
												</td>
												<td>
														<input type="reset" id="resetproduct" name="resetproduct" value="Làm lại">
												</td>
											</tr>
										</table>
						</tbody>
		</tbody>
	</table>
</td>
</tr>

</table>
<br>
<!-- 3 menu cố định -->
<div id="pettabs" class="indentmenu">
	<ul>
		<li>
			<a href="#" rel="dog1" class="selected">
				<strong>Chi tiết sản phẩm</strong>
			</a>
		</li>

	</ul>
	<br style="clear: left">
</div>

<!-- Chọn menu nào thì tab đó xuất hiện -->
<div style="border:1px solid #CCCCCC; width:750px; padding-bottom:10px; padding-left:10px; padding-right:10px; padding-top:10px;">
	<!-- Dog 1, chèn nội dung vào đây --->
	<div id="dog1" class="tabcontent" style="display: block;">
		<textarea id="productdetailedit" name="productdetailedit" rows="55" cols="90" style="width: 100%">{$productdetail[0].productdetail}
		</textarea>
	</div>
</div>
</td>
</tr>
</tbody>
</table>
</form>
<script type="text/javascript">
var mypets=new ddtabcontent("pettabs")
mypets.setpersist(true)
mypets.setselectedClassTarget("link")
mypets.init(0)
</script>
<br>

<!-- Sản phẩm khác -->
